const fs = require('fs')
const url = require('url')
const querystring = require('querystring')
const log4js = require('log4js')
const zlib = require('zlib')
const readline = require('readline')
const crypto = require('crypto')
const EventEmitter = require('events')
const mime = require('mime')


log4js.configure({
  appenders: {
    cheese: {type:'file', filename:'debug.log'}
  },
  categories: {
    default: {appenders: ['cheese'], level:'debug'}
  }
})


const prompt = readline.createInterface({
  input: process.stdin,
  output: process.stdout
})

function encrypt(raw){
  return crypto.createHash('sha1').update(raw).digest('hex')

}

const logger = log4js.getLogger('cheese')


logger.level = 'debug'


console.log(encrypt('hello'))

const emitter = new EventEmitter()

// module.exports = {
//   logger,
//
// }




